#include "head.h"

void print(int sig) {
    printf("3 sec counts down.\n");
}

int main() {
    struct itimerval itv;
    itv.it_interval.tv_sec = 3;
    itv.it_interval.tv_usec = 0;

    itv.it_value.tv_sec = 10;
    itv.it_value.tv_usec = 0;

    signal(SIGALRM, print);

    setitimer(ITIMER_REAL, &itv, NULL);
    
    while (1) {
        pause();
    }

    return 0;
}